﻿<UserControl
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  x:Class="ViewOnCore.Helper.WPF.FolderBrowserDialog"
  xmlns:host="clr-namespace:ViewOnCore.HostContract"
  xmlns:wpf="clr-namespace:ViewOnCore.Helper.WPF"
  xmlns:properties="clr-namespace:ViewOnCore.Properties"
  Height="500"
  Width="600">
    <wpf:ChildWindowDecorator x:Name="childWindowDecorator" IsResizable="True">

        <Grid>

            <Grid.RowDefinitions>
                <RowDefinition Height="30" />
                <RowDefinition Height="*" />
                <RowDefinition Height="30" />
                <RowDefinition Height="5" />
            </Grid.RowDefinitions>

            <Border Margin="2,2,2,2" Background="{DynamicResource VOColor11}" CornerRadius="1" Opacity="0.5"/>
            <StackPanel Orientation="Horizontal" Height="30" Margin="7,0,7,0">
                <Button x:Name="btnMakeFolder" Margin="5,2,5,2" Style="{DynamicResource Button.TransparentWithEffect2}">
                    <StackPanel Orientation="Horizontal">
                        <wpf:Icon Source="/_images/Generic/add.png" Width="18" Height="18"/>
                        <TextBlock Text="{x:Static properties:Globalization.MakeFolder}" Margin="5,0,5,0" VerticalAlignment="Center"/>
                    </StackPanel>
                </Button>
                <Button x:Name="btnDeleteFolder" Margin="5,2,5,2" Style="{DynamicResource Button.TransparentWithEffect2}">
                    <StackPanel Orientation="Horizontal">
                        <wpf:Icon Source="/_images/Generic/remove.png" Width="18" Height="18"/>
                        <TextBlock Text="{x:Static properties:Globalization.DeleteFolder}" Margin="5,0,5,0" VerticalAlignment="Center"/>
                    </StackPanel>
                </Button>
            </StackPanel>

            <Border Grid.Row="1" Background="{DynamicResource VOColor12}" CornerRadius="1">
                <Grid>
                    <TreeView x:Name="treeView"
                              ScrollViewer.CanContentScroll="False"/>
                    <wpf:Spinner x:Name="spinner"/>
                </Grid>
            </Border>

            <Button x:Name="btnCancel" Style="{StaticResource Button.TransparentWithEffect}" Grid.Row="2" Width="80" HorizontalAlignment="Left" Margin="110,0,0,0" VerticalAlignment="Bottom" Click="btnCancel_Click">
                <TextBlock Text="{x:Static properties:Globalization.Cancel}" Margin="5,5,5,5"/>
            </Button>
            <Button x:Name="btnOk" Style="{StaticResource Button.TransparentWithEffect}" Grid.Row="2" Width="80" HorizontalAlignment="Left" Margin="10,0,0,0" VerticalAlignment="Bottom" Click="btnOk_Click">
                <TextBlock Text="{x:Static properties:Globalization.Ok}" Margin="5,5,5,5"/>
            </Button>

        </Grid>

    </wpf:ChildWindowDecorator>
</UserControl>
